<template>
  <div class="app-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="待办任务" name="first">
        <todo v-if="activeName === 'first'" />
      </el-tab-pane >
      <el-tab-pane label="已办任务" name="third">
        <finished v-if="activeName === 'third'" />
      </el-tab-pane>
      <el-tab-pane label="固定资产管理" name="fourth">
        <assetsManage v-if="activeName === 'fourth'" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import assetsManage from './components/AssetsManage.vue';
import finished from './components/Finished.vue';
import todo from './components/Todo.vue';

export default {
  components: { assetsManage, finished, todo },
  name:'FixedAssets',
  data() {
    return {
      activeName: 'first'
    };
  },
  mounted() {
    // 获取按钮元素数组中第一个.click()
  },
  methods: {

    handleClick(tab, event) {
      this.activeName = tab.name
    }
  }
};
</script>

<style lang="scss" scoped>
</style>
